package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/11/14.
 * Des:广告枚举
 */
public class AdvisterEnums {
    public enum AdvType {
        ERCODE("二维码", "1"), IMG("图片", "2"),AUDIO("语音","3"),VIDEO("视频","4"),HTML("视频","5");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AdvType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (AdvType d : AdvType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }


    public enum AdvPlantForm{
        APP("移动平台", "1"), WEB("web平台", "2"),ALL("全平台","3");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AdvPlantForm(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (AdvPlantForm d : AdvPlantForm.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    public enum AdvShowType{
        TIME("短期", "0"), FOREVER("永久", "1");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AdvShowType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (AdvShowType d : AdvShowType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }




    public enum AdvContentRpType{
        PRODUCT("货物", "1"), GOODSSPECIAL("专题", "2");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private AdvContentRpType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (AdvContentRpType d : AdvContentRpType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }


}
